package com.unisyou;

import java.util.Arrays;

public class Demo3 {
    public static void main(String[] args) {
        Long[] l = {1l,2l,3l,4l,5l,6l};
        System.out.println(longToString(l));
        System.out.println(Arrays.toString(l));
    }

    public static String[] longToString(Long longArray[]) {
        if (longArray == null || longArray.length < 1) {
            return null;
        }
        String  stringArray[] = new String[longArray.length];
        for (int i = 0; i < stringArray.length; i++ ) {
            try {
                stringArray[i] = String.valueOf(longArray[i]);
            } catch (NumberFormatException e) {
                stringArray[i] = null;
                continue;
            }
        }
        return stringArray;
    }
}
